<?php

defined('_JEXEC') or die;
?>

<div class="rt-social-buttons">							
<?php foreach ($list as $item) :	?>

	<?php
	$link = $item['lien'];
	$res=$item['reseau'];
	switch ($params->get('target', 3))
	{
		case 1:
			// open in a new window
			echo '<a id="rt-'. $res .'-btn" href="'. $link .'" target="_blank" rel="'.$params->get('follow', 'no follow').'">
			<span class="rt-social-icon"><span class="rt-social-text">Follow via '.$res.'</span></span></a>';
			break;

		case 2:
			// open in a popup window
			echo "<a id='rt-'. $res .'-btn' href=\"#\" onclick=\"window.open('". $link ."', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false\">".
				'<span class="rt-social-icon"><span class="rt-social-text">Follow via '.$res.'</span></span></a>';
			break;

		default:
			// open in parent window
			echo '<a id="rt-'. $res .'-btn" href="'. $link .'" rel="'.$params->get('follow', 'no follow').'">
				<span class="rt-social-icon"><span class="rt-social-text">Follow via '.$res.'</span></span></a>';
			break;
	}
	?>
	<?php if ($params->get('description', 0)) : ?>
		<?php echo nl2br($item->description); ?>
	<?php endif; ?>

	

<?php endforeach; ?>

</div>